package cn.edu.jsu.official.pojo.dto;

import cn.edu.jsu.official.serializer.DateSerializer;
import cn.edu.jsu.official.serializer.DateTimeSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;
import java.util.List;

/**
 * @author Mo
 * @createTime 2022/3/1 18:16
 * @description
 */
@Data
@Document(collection = "contest_info")
public class ContestInfo {
    @Id
    @ApiModelProperty("主键Id")
    private String contestInfoId;
    @ApiModelProperty("竞赛名称")
    private String contestName;
    @ApiModelProperty("竞赛介绍")
    private String contestIntroduction;
    @ApiModelProperty("开始时间")
    @JSONField(serializeUsing = DateSerializer.class, deserializeUsing = DateSerializer.class)
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date startTime;
    @ApiModelProperty("竞赛图片Id")
    private ObjectId contestImageId;
    @ApiModelProperty("参赛人员")
    private List<String> contestParticipants;
}
